package com.wanxi.springboot.team.manage.system.mapper;

import com.wanxi.springboot.team.manage.system.model.RolePermission;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 蒋帆
 * @since 2020-12-21
 */
public interface RolePermissionMapper extends BaseMapper<RolePermission> {

    void updateRolePermission(@RequestParam("list") List<Integer> list, @RequestParam("roleId") Integer roleId, @RequestParam("enable") String enable);

    void addRolePermission(@RequestParam("list") List<Integer> list, @RequestParam("roleId") Integer roleId);

    boolean haveRolePermission(@RequestParam("permissionId") Integer permissionId, @RequestParam("roleId") Integer roleId);
}
